#ifndef prs_Image_H
#define prs_Image_H

#include "prs_Attr.h"
#include "prs_FrmDict.h"
#include "grf.h"

namespace prs{

/////////////////////////////////////////////////////
struct TNodeImage : public TAttrNode, TFrmDict
{
	DECLARE_ClientNode()
    grf::TImageGdiP Image;
	TAttrNodeType<nodeType_Image> NodeType;
	TAttrId Id;
	//
	TNodeImage(): NodeType(this), Id(this) {}
	//
	int LoadImage(const svl::TString &Name);
private:
	svl_Except;
};

struct TNodeImages : public TNodeArrayT<TNodeImage>
{
	TNodeImages(svl::TString path = "img\\"): Path(path) {}
	//
	svl::TString Path;
	grf::TImageGdiP *GetImage(const svl::TString &Name,svl::TString &OutError = svl::TString() );
private:
	svl_Except;
};

}

#endif